﻿<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns="http://wpunifiedad.codeplex.com"
           elementFormDefault="unqualified" attributeFormDefault="unqualified"
           targetNamespace="http://wpunifiedad.codeplex.com">
  <!-- Definition of elements -->
  <!-- Definition of attributes -->
  <!-- Definition of complex types-->
  <xs:element name="Probability">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string">
          <xs:attribute name="Value" type="xs:decimal" use="required"/>
          <xs:attribute name="AdProvider" use="required">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="PubCenter"/>
                <xs:enumeration value="AdMob"/>
                <xs:enumeration value="None"/>
                <xs:enumeration value="MobFox"/>
                <xs:enumeration value="AdDuplex"/>
                <xs:enumeration value="Smaato"/>
                <xs:enumeration value="GenericAdProviderForXaml"/>
                <xs:enumeration value="InnerActive"/>
                <xs:enumeration value="MillennialMedia"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>  
  <xs:element name="AdCountryDescriptor">
    <xs:complexType>
      <xs:sequence>
        <xs:sequence>
          <xs:element ref="Probability" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:sequence>
      <xs:attribute name="Country" type="xs:string" use="optional" />
      <xs:attribute name="InitialAdProvider" type="xs:string" use="optional" />
    </xs:complexType>
  </xs:element>
  <xs:element name="CountryDescriptors">
    <xs:complexType>
      <xs:sequence>
        <xs:sequence>
          <xs:element ref="AdCountryDescriptor" minOccurs="1" maxOccurs="unbounded" />
        </xs:sequence>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="AdSettings">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="CountryDescriptors" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>